package com.wodsy.phoenix.dataservice.shopc.service;

import com.wodsy.phoenix.dataobject.base.Pager;
import com.wodsy.phoenix.dataobject.base.PhoenixGenericResponse;
import com.wodsy.phoenix.dataobject.base.PhoenixResponseWrapper;
import com.wodsy.phoenix.dataobject.shopc.model.*;

import java.util.List;

public interface ShopService {

	/**
	 * 通过店铺审核
	 * @param shopId
	 * @param shopOwnerId
	 * @param operId
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> passShopAudit(Integer shopId, Integer shopOwnerId, Integer operId);
	
	/**
	 * 拒绝店铺审核
	 * @param shopId
	 * @param shopOwnerId
	 * @param operId
	 * @param denyReason
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> denyShopAudit(Integer shopId, Integer shopOwnerId, Integer operId, String denyReason);
	
	/**
	 * 获取店铺审核结果
	 * @param shopId
	 * @return
	 */
	PhoenixResponseWrapper<ShopAudit> getShopAudit(Integer shopId);
	
	/**
	 * 添加店铺
	 * @param shop
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> addShop(Shop shop);
	
	/**
	 * 删除店铺
	 * @param shopId
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> delShop(Integer shopId);
	
	/**
	 * 修改店铺
	 * @param shop
	 */
	PhoenixResponseWrapper<Shop> updateShop(Shop shop);
	
	/**
	 * 查询店铺 by shopId
	 * @param shopId
	 * @return
	 */
	PhoenixResponseWrapper<Shop> getShop(Integer shopId);
	
	/**
	 * 查询店铺
	 * @param pager
	 * @return
	 */
	PhoenixResponseWrapper<Shop> findShop(Pager<Shop> pager);
	
	/**
	 * 店铺开放
	 * @param shopId
	 */
	PhoenixResponseWrapper<Shop> openShop(Integer shopId);
	
	/**
	 * 店铺关闭
	 * @param shopId
	 */
	PhoenixResponseWrapper<Shop> closeShop(Integer shopId);
	
	/**
	 * 添加店铺政策
	 * @param policy
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> addShopPolicy(ShopPolicy policy);
	
	/**
	 * 修改店铺政策
	 * @param policy
	 */
	PhoenixResponseWrapper<ShopPolicy> updateShopPolicy(ShopPolicy policy);
	
	/**
	 * 查询店铺政策
	 * @param shopId
	 * @return
	 */
	PhoenixResponseWrapper<ShopPolicy> getShopPolicy(Integer shopId);

	/**
	 * 查询所有承诺
	 * @return
	 */
	PhoenixResponseWrapper<Promise> findPromises();

	/**
	 * 查询某一承诺
	 * @param id
	 * @return
	 */
	PhoenixResponseWrapper<Promise> getPromise(int id);

	/**
	 * 添加店铺收藏
	 * @param userId
	 * @param shopId
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> addShopFavorite(Integer userId, Integer shopId);
	
	/**
	 * 取消店铺收藏
	 * @param userId
	 * @param shopId
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> delShopFavorite(Integer userId, Integer shopId);
	
	/**
	 * 查询某用户收藏的店铺
	 * @param pager
	 * @param userId
	 * @return
	 */
	PhoenixResponseWrapper<ShopFavorite> findShopFavoritesByUserId(Pager<ShopFavorite> pager, Integer userId);

	/**
	 * 查询某用户收藏的某一店铺
	 * @param userId
	 * @param shopId
	 * @return
	 */
	PhoenixResponseWrapper<ShopFavorite> findShopFavoritesByUserId(Integer userId, Integer shopId);
	
	/**
	 * 举报店铺
	 * @param report
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> reportShop(ShopReport report);
	
	/**
	 * 查询某店铺被举报的记录
	 * @param pager
	 * @param shopId
	 * @return
	 */
	PhoenixResponseWrapper<ShopReport> findShopReportByShopId(Pager<ShopReport> pager, Integer shopId);
	
	/**
	 * 添加店主账户信息
	 * @param account
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> addShopkeeperAccount(ShopkeeperAccount account);
	
	/**
	 * 删除店主账户信息 标记
	 * @param accountId
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> delShopkeeperAccount(Integer accountId);
	
	/**
	 * 禁用店主账户信息 
	 * @param accountId
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> disableShopkeeperAccount(Integer accountId);
	/**
	 * 启用店主账户信息 
	 * @param accountId
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> enableShopkeeperAccount(Integer accountId);
	
	/**
	 * 修改店主账户信息
	 * @param account
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> updateShopkeeperAccount(ShopkeeperAccount account);
	
	/**
	 * 查询店主账户信息 by shopId
	 * @param shopId
	 * @return
	 */
	PhoenixResponseWrapper<ShopkeeperAccount> findShopkeeperAccountByShopId(Integer shopId);
	
	/**
	 * 查询店主账户信息 by userId
	 * @param userId
	 * @return
	 */
	PhoenixResponseWrapper<ShopkeeperAccount> findShopkeeperAccountByUserId(Integer userId);
	
	/**
	 * 添加店主认证信息
	 * @param auth
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> addShopkeeperAuthInfo(ShopkeeperAuthInfo auth);
	
	/**
	 * 修改店主认证信息
	 * @param auth
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> updateShopkeeperAuthInfo(ShopkeeperAuthInfo auth);
	
	/**
	 * 查询店主认证信息 by shopId
	 * @param shopId
	 * @return
	 */
	PhoenixResponseWrapper<ShopkeeperAuthInfo> getShopkeeperAuthInfo(Integer shopId);
	
	/**
	 * 添加店铺推荐商品 
	 * @param shopId
	 * @param goodId
	 * @param weight
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> addGoodRecommend(Integer shopId, Integer goodId, Integer weight);
	
	/**
	 * 删除店铺推荐商品
	 * @param id
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> delGoodRecommend(Integer id);
	
	/**
	 * 修改店铺推荐商品权重
	 * @param id
	 * @param weight
	 */
	PhoenixResponseWrapper<PhoenixGenericResponse> updateGoodRecommendWeight(Integer id, Integer weight);
	
	/**
	 * 查询店铺推荐商品 order by weight
	 * @param shopId
	 * @return
	 */
	PhoenixResponseWrapper<ShopkeeperRecommendGoods> findGoodRecommends(Integer shopId);
}
